package cn.webrx.bs.service;

import cn.webrx.bs.entity.AdminLog;

import java.util.Date;
import java.util.List;

/**
 * <p>功能描述: </p>
 *
 * @author webrx
 * @version 1.0
 * @date 2020-09-03 11:55
 */
public class AdminLogImpl implements AdminLogDao {
    @Override
    public int add(AdminLog log) {
        return add(log.getInfo(),log.getCdate(),log.getIp(),log.getAdmin());
    }

    @Override
    public int add(String info, Date time, long ip, String account) {
        int num = 0;
        try {
            num = run.update("insert into bs_adminlog values(null,?,?,?,?)",info,time,ip,account);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return num;
    }

    @Override
    public List<AdminLog> queryAll() {
        return null;
    }
}
